package cn.thoughtworks.school.notifications.impl;

import cn.thoughtworks.school.notifications.NotificationFactory;
import cn.thoughtworks.school.notifications.Properties;
import cn.thoughtworks.school.services.ProgramCenterService;
import cn.thoughtworks.school.services.UserCenterService;

import java.util.Map;

public class GrowthLogTutorToStudentNotification extends NotificationFactory {

    public GrowthLogTutorToStudentNotification(Map data, Properties properties, UserCenterService userCenterService, ProgramCenterService programCenterService) {

        super(data, properties, userCenterService, programCenterService);
    }

    @Override
    protected String getMessage() {
        StringBuilder message = new StringBuilder();
        Map sender = getUser(Long.parseLong(data.get("senderId").toString()));
        String diaryDate = data.get("diaryDate").toString();
        message.append(" 成长日志中用户 ")
                .append(getUserName(sender))
                .append(" 在「")
                .append(diaryDate)
                .append("日」的日志中评论了你! ");

        return message.toString();
    }
  @Override
  protected String getMessage_en() {
    StringBuilder message = new StringBuilder();
    Map sender = getUser(Long.parseLong(data.get("senderId").toString()));
    message.append(getUserName(sender))
      .append(" commented your diary.");

    return message.toString();
  }

}
